GUI Help > Special > addTreeViewItem

addTreeViewItem
handle item=addTreeViewItem(handle gadget, handle parentItem, int image, str text)

Description:
Adds a new item to a treeview. A treeview item has an image and a piece of text. Unlike listboxes and comboboxes, treeviews use handles for items rather than indicies. When you want to modify an item pass the handle returned by addTreeViewItem to the treeview functions.
In order to use images, you must have assigned an image list to the treeview using setTreeViewImageList.

Return Value:
Handle of the new treeview item.

Parameters:
gadget Handle of a treeview gadget
parentItem Handle of a treeview item. The new item will be created as a child of the parent item. If this parameter is 0, the new item is added to the root of the treeview.
image Index of the image to use for the item. In order to use images you must add an imagelist to the treeview.
text The text of the new item.
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)